package com.xiangban.controller;

import com.xiangban.model.Insurance;
import com.xiangban.model.res.ApiResult;
import com.xiangban.service.InsuranceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ly
 * @date 2021/12/28 15:06
 */
@RestController
@Api("保单控制器")
@RequestMapping("/api/user_accompany/insurance")
public class InsuranceController {
    @Autowired
    private InsuranceService insuranceService;
    @ApiOperation("保单")
    @PostMapping("insurance")
    public ApiResult<Object> Insurance(@RequestBody Insurance insurance){
        return ApiResult.newSuccess(insuranceService.Insurance(insurance));

    }
}
